function delay(ms) {
  return new Promise((resolve, reject) => {
    setTimeout(() => {
      //   resolve('Operation completed successfully!');
      reject('Operation completed successfully!');
    }, ms);
  });
}

async function asyncFunction() {
  try {
    const result = await delay(2000);
    console.log(result); // 打印: Operation completed successfully!
  } catch (error) {
    console.log('catch error: ', error);
  }
}

asyncFunction();
